home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 November / Pcwk1197.iso / LOTUS / Eng-ins / SMASTERS / APPROACH / DB2WWW.MPR / SCRIPT / ApproachDoc / WWW Assistant / Body / txtNumRows.s (.txt) < prev    next >
Null Bytes Alternating  |  1997-01-09  |  2KB  |  27 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Change(Source As Fieldbox)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As FIELDBOX
  11.     Set Source = Bind(Objectname_)
  12.     On Event Change From Source Call Change
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Change:1:12
  16. Sub Change(Source As Fieldbox)
  17.     'This will check to make sure that anything typed in the numrows box is a whole number only:
  18.     On Error Resume Next
  19.     If Not (Isnumeric(source.text)) Or (Int(Val(source.text))) <> Val (source.text)  Or Left$(source.text,1) = "-" Then
  20.         Messagebox "Must enter whole positive numbers only",,"Input Error"
  21.         source.text = ""
  22.         source.refresh
  23.         source.setfocus
  24.     End If
  25.     
  26.     Err = 0
  27. End Sub